@model WalkingTec.Mvvm.Doc.ViewModels.SchoolVms.SchoolVm

<wt:quote>
    <p>WTM provides more than 10 form controls, covering the needs of most back-end management programs.</p>
    <p>The form control in WTM framework simplifies several aspects of work:</p>
    <ul class="doc">
        <li>Automatically generate the Label of control according to the Display property on the bound field;</li>
        <li>Automatically judge whether the binding field is required, and add an asterisk if it is required;</li>
        <li>Generate clientside validation automatically according to the validation attribute on the bound field;</li>
        <li>Automatically output  errors generated by back-end validation of the form.</li>
    </ul>
</wt:quote>

<wt:fieldset field-set-style="Simple" title="Form">
 </wt:fieldset>
   <p>A form is usually represented by a form control. Other form controls are nested inside the form control, and the submit button is included</p>
    <p>Common properties of form are:</p>
        <table lay-filter="parse-table-demo">
            <thead>
                <tr>
                    <th lay-data="{field:'username', width:200}">Property</th>
                    <th lay-data="{field:'joinTime', width:600}">Description</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td>Id</td>
                    <td>Form ID,if no other JS operation is required, it can be left blank</td>
                </tr>
                <tr>
                    <td>Url</td>
                    <td>Form submission address, default to current page address</td>
                </tr>
                <tr>
                    <td>Vm</td>
                    <td>ViewModel of form binding, required</td>
                </tr>
                <tr>
                    <td>BeforeSubmit</td>
                    <td>JS to be executed before form submission</td>
                </tr>
                <tr>
                    <td>OldPost</td>
                    <td>Whether to use the traditional way of submitting the whole page instead of Ajax, default=false</td>
                </tr>
                <tr>
                    <td>LabelWidth</td>
                    <td>The length of the internal label of the form, default=80</td>
                </tr>
            </tbody>
        </table>
    <div style="height:10px;">&nbsp;</div>
        <wt:tab>
            <wt:tabheaders>
                <wt:tabheader title="Effect" />
                <wt:tabheader title="Code" />
            </wt:tabheaders>
            <wt:tabcontents>
                <wt:tabcontent>
                    <wt:form vm="@Model" style="max-width:600px;">
                        <wt:textbox field="Entity.SchoolCode" />
                        <wt:textbox field="Entity.SchoolName" />
                        <wt:combobox field="Entity.SchoolType" />
                        <wt:row align="AlignEnum.Right">
                            <wt:submitbutton disabled="true" />
                            <wt:closebutton disabled="true" />
                        </wt:row>
                    </wt:form>
                </wt:tabcontent>
                <wt:tabcontent>
                    <wt:code>
&ltwt:form vm="@@Model" width="600"&gt
    &ltwt:textbox field="Entity.SchoolCode" /&gt
    &ltwt:textbox field="Entity.SchoolName" /&gt
    &ltwt:combobox field="Entity.SchoolType" /&gt
    &ltwt:row align="AlignEnum.Right"&gt
        &ltwt:submitbutton disabled="true" /&gt
        &ltwt:closebutton disabled="true" /&gt
    &lt/wt:row&gt
&lt/wt:form&gt
                    </wt:code>
                </wt:tabcontent>
            </wt:tabcontents>
        </wt:tab>


    <script>
    layui.use('code',function(){layui.code({ about: false })})
        layui.table.init('parse-table-demo', {
        limit: 100, page: false
        });
   </script>
<script>
  $("#@Model.ViewDivId").parent().css("height", "auto");
</script>
